package com.atguigu.gulimall.product.vo;

import com.atguigu.gulimall.product.entity.SkuImagesEntity;
import com.atguigu.gulimall.product.entity.SkuInfoEntity;
import com.atguigu.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;
import lombok.ToString;

import java.util.List;

@Data
public class SkuItemVo {
    private SkuInfoEntity info;
    private boolean hasStock=true;
    private List<SkuImagesEntity> images;
    private List<SkuItemSaleAttrVO> saleAttr;
    private SpuInfoDescEntity desp;
    private List<SpuItemGroupAttrVo> groupAttrs;

    @Data
    @ToString
    public static class SkuItemSaleAttrVO{
        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuIdVo> attrValues;
    }
    @Data
    @ToString
    public static class SpuItemGroupAttrVo{
        private String groupName;
        private List<SpuBaseAttrVo> attrs;
    }
    @Data
    @ToString
    public static class SpuBaseAttrVo{
        private String attrName;
        private String attrValue;
    }
    @Data
    @ToString
    public static class AttrValueWithSkuIdVo{
        private String attrValue;
        private String skuIds;
    }

}
